﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System.Threading;
using Microsoft.Xna.Framework.Input;
using LGE;

namespace UpUp
{
    public class GameOverScreen : GameScreen
    {
        Texture2D congratsSprite;
        Texture2D messageSprite;
        Vector2 congratsPos = new Vector2(292, 100);
        Vector2 messagePos = new Vector2(126, 198);
        float cA = 0;
        float mA = 0;

        public GameOverScreen()
            : base()
        {
            congratsSprite = Engine.Load<Texture2D>("Images\\PlayScreen\\congratulations");
            messageSprite = Engine.Load<Texture2D>("Images\\PlayScreen\\mensagem");
        }

        public override void Update(GameTime gameTime)
        {
            if (Input.KeyPressed(Keys.Enter) || Input.ButtonPressed(Buttons.Start)) GameScreenManager.ChangeScreen(new StartScreen());
            cA += 0.01f;
            if (cA > 1) cA = 1;
            if (cA > 0.6f && mA < 1) mA += 0.01f;

        }

        public override void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(congratsSprite, congratsPos, new Color(cA, cA, cA, cA));
            spriteBatch.Draw(messageSprite, messagePos, new Color(mA, mA, mA, mA));
        }
    }
}
